package org.opportunity.wishlist.travelwish.util;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.opportunity.wishlist.travelwish.pojo.dao.FacetDao;
import org.opportunity.wishlist.travelwish.pojo.model.Facet;

public class Facets {
    
    public Map<String, Facet> facet = new HashMap<String, Facet>();
    private String choice;
    
    
    public Facets() {
	List<Facet> facets = null;
	FacetDao dao = new FacetDao();
	facets = dao.findAll();
	for (Facet fct : facets) {
	    this.facet.put(fct.getPropertyName(), fct);
	}
    }
    
    public Facet getFacet() {
        return facet.get(choice);
    }

    public void setChoice(String choice) {
        this.choice = choice;
    }

}
